package com.lapian.designmode.flyweight;

public class Client {
    public static void main(String[] args) {
        WebsiteFactory websiteFactory = new WebsiteFactory();
        Website website1=websiteFactory.getWebSiteCategory("新闻");
        website1.use(new User("hello"));
        Website website2=websiteFactory.getWebSiteCategory("博客");
        website2.use(new User("hello2"));
        Website website3=websiteFactory.getWebSiteCategory("博客");
        website3.use(new User("hello3"));
        Website website4=websiteFactory.getWebSiteCategory("博客");
        website4.use(new User("hello4"));
        System.out.println("网站的分类共："+websiteFactory.getWebsiteCount());
    }
}
